/*
 * v1.1 by tonydon site:txdnet.cn
 * netbeansIDE 7.1
 */
package cn.txdnet.txcms.domain;

import cn.txdnet.txweb.annotation.validation.Validator;


/**
 *
 * @author txdnet
 */

public class Mgrole  extends BaseEntity{
    private static final long serialVersionUID = -6866308952697408518L;
    
    private Integer roleid;

    private String rolename;

    private String rolelevel;

    private String remark;

    public Mgrole() {
    }

    public Mgrole(Integer roleid) {
        this.roleid = roleid;
    }

    public Mgrole(Integer roleid, String rolename, String rolelevel, String remark) {
        this.roleid = roleid;
        this.rolename = rolename;
        this.rolelevel = rolelevel;
        this.remark = remark;
    }

    public Integer getRoleid() {
        return roleid;
    }

    public void setRoleid(Integer roleid) {
        this.roleid = roleid;
    }

    public String getRolename() {
        return rolename;
    }

    public void setRolename(String rolename) {
        this.rolename = rolename;
    }

    public String getRolelevel() {
        return rolelevel;
    }

    public void setRolelevel(String rolelevel) {
        this.rolelevel = rolelevel;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (roleid != null ? roleid.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Mgrole)) {
            return false;
        }
        Mgrole other = (Mgrole) object;
        if ((this.roleid == null && other.roleid != null) || (this.roleid != null && !this.roleid.equals(other.roleid))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "cn.txdnet.txcms.domain.Mgrole[ roleid=" + roleid + " ]";
    }

    @Override
    public boolean validate() {
        return Validator.validate(this);
    }
    
}
